-- 菜单SQL
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
    VALUES ('1', '${tableDesc}', '${genParam.moduleName}/${pathName}', NULL, '1', 'config', '6');

-- 按钮父菜单ID
set @parentId = @@identity;
<#assign permizPerfix = genParam.moduleName + ":" +tableName?replace("_", ":")>
-- 菜单对应按钮SQL
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
    SELECT @parentId, '查看', null, '${permizPerfix}:list,${permizPerfix}:info', '2', null, '6';
<#if tableOperates?? && tableOperates?size gt 0>
<#list tableOperates as operate>
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
    SELECT @parentId, '${operate.desc}', null, '${permizPerfix}:${operate.name}', '2', null, '6';
</#list>
</#if>